airbnb = read_csv("airbnb_dataset_parsed_cleaned_uploadable_without_text2.csv")
## Warning: Missing column names filled in: 'X1' [1]
## Parsed with column specification:
## cols(
##   .default = col_double(),
##   neighbourhood_group = col_character(),
##   neighbourhood = col_character(),
##   room_type = col_character(),
##   bed_type = col_character(),
##   amenities = col_character(),
##   host_has_profile_pic = col_character(),
##   host_verifications = col_character(),
##   `Cable TV` = col_logical()
## )
## See spec(...) for full column specifications.
airbnb =
  airbnb %>% 
  filter(review_scores_rating!=0, price>0)  %>% mutate(host_has_profile_pic = ifelse(host_has_profile_pic == "t", 1, 0), log_price=log(price))

Column

Chart A

airbnb %>% 
  mutate(neighbourhood = fct_reorder(neighbourhood, log_price)) %>% 
  plot_ly(y = ~log(price), color = ~neighbourhood, type = "box",
          colors = "Set2")

Chart B

airbnb %>% 
  count(neighbourhood_group) %>% 
  mutate(neighbourhood = fct_reorder(neighbourhood_group, n)) %>% 
  plot_ly(x = ~neighbourhood_group, y = ~n, color = ~neighbourhood_group, type = "bar")

Column

Chart C

airbnb %>%
  mutate(text_label = str_c("Price: $", price, '\nNeighborhood:', neighbourhood, '\nType: ', room_type, '\nNo. of Reviews: ',number_of_reviews)) %>% 
  plot_ly(x = ~review_scores_rating, y = ~log_price, type = "box",
          color = ~room_type, text = ~text_label, alpha = 0.4)

Chart D

airbnb %>%
  mutate(text_label = str_c("Price: $", price, '\nNeighborhood:', neighbourhood, '\nType: ', room_type, '\nNo. of Reviews: ',number_of_reviews)) %>% 
  plot_ly(x = ~amenities2, y = ~log_price, type = "scatter",  mode='markers', color = ~room_type, text = ~text_label, alpha = 0.4)